$("#logines").click(function() {
	$.ajax({
		url: "http://localhost:8080/springend-sys/getAll",
		type: "post",
		data: {
			phone: $("#phone").val(),
			password: $("#password").val()
		},
		dataType: "json",
		success: function(result) {
			if (result.status == 0) {
				var aid = result.data.list[0].aid;
				if (aid != null && aid != '') {
					layer.msg("欢迎登录管理员系统");
				}
				var sid = result.data.list[0].sid;
				if (sid != null && sid != '') {
					layer.msg("欢迎登录学生系统");
				}
				var tid = result.data.list[0].tid;
				if (tid != null && tid != '') {
					layer.msg("欢迎登录教师系统");
				}
				var rid = result.data.list[0].rid;
				sessionStorage.setItem("aid", aid);
				sessionStorage.setItem("sid", sid);
				sessionStorage.setItem("tid", tid);
				sessionStorage.setItem("rid", rid);
				sessionStorage.setItem("login", 1102);
				window.location.href = "reception.html"; //跳转页面
				layer.msg("登录成功");
			} else {
				layer.msg("账号密码不对或账号已被锁定");
			}
		}
	})
})

